pup: enable OAuth for ASM WAF commands - #757
Draft
srosenthal-dd wants to merge 1 commit into
Draft
Conversation
Switch 10 ASM WAF functions in security.rs from make_api_no_auth! to make_api! so they send the OAuth bearer token. Add appsec_protect_read and appsec_protect_write to the OAuth scope list in auth/types.rs. Server-side dependency: the ASM WAF routes in dd-go rc-api need to accept OAuth at the gateway level. This is currently blocked pending investigation with the remote-config team (DAL-743).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch 10 ASM WAF functions in
security.rsfrommake_api_no_auth!tomake_api!so they send the OAuth bearer token. Addappsec_protect_readandappsec_protect_writeto the OAuth scope list inauth/types.rs.Server-side dependency
The ASM WAF routes are in dd-go's rc-api service (chi router, JWT-based auth from the API gateway). The server-side gap is at the gateway level -- the rc-api service itself has no per-route authn method configuration. This is blocked pending investigation with the remote-config team (DAL-743).
Changes
src/commands/security.rs: 10make_api_no_auth!->make_api!swaps (5asm_custom_rules_*+ 5asm_exclusions_*)src/auth/types.rs: Addedappsec_protect_readandappsec_protect_writeto the OAuth scope list